package io.kiki.sba.registry.core.model;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Setter
@Getter
public class ReceivedData implements Serializable {

    private static final long serialVersionUID = 1L;

    private String dataId;

    private String group;

    private String instanceId;

    private String segment;

    private String scope;

    private List<String /*registId*/> subscriberRegistIds;

    private Map<String /*zone*/, List<Data>> data;

    private Long version;

    private String localZone;

    private Map<String, Integer> dataCount = new HashMap<String, Integer>();


    public ReceivedData() {
    }

    /**
     * Instantiates a new Received data multi.
     *
     * @param dataId              the data id
     * @param group               the group
     * @param instanceId          the instance id
     * @param segment             the data center
     * @param subscriberRegistIds the subscriber regist ids
     * @param data                the data
     * @param version             the version
     */
    public ReceivedData(String dataId, String group, String instanceId, String segment, List<String> subscriberRegistIds, Map<String, List<Data>> data, Long version) {
        this.dataId = dataId;
        this.group = group;
        this.instanceId = instanceId;
        this.segment = segment;
        this.subscriberRegistIds = subscriberRegistIds;
        this.data = data;
        this.version = version;
    }


}
